package com.design.model;

/**
 * def
 *
 * @author lw
 * @date 2023/12/1 14:39
 **/
public class Director {

    private HouseBuilder builder;

    public Director(HouseBuilder builder) {
        this.builder = builder;
    }

    public House constructHouse() {
        builder.buildFoundation();
        builder.buildStructure();
        builder.buildRoof();
        builder.buildInterior();
        return builder.getHouse();
    }
}
